package com.kaka.bus.adapter;

import android.content.Context;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kaka.bus.R;
import com.kaka.bus.bean.EvaluateBean;
import com.kaka.bus.view.EvaluateButton;

import java.util.List;

/**
 * Created by OnionMac on 2018/1/17.
 */

public class EvaluateItemAdapter extends BaseQuickAdapter<EvaluateBean.ListBean,BaseViewHolder> {

    private Context mContext;

    public EvaluateItemAdapter(int layoutResId, @Nullable List<EvaluateBean.ListBean> data, Context context) {
        super(layoutResId, data);
        mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, EvaluateBean.ListBean item) {
        helper.setText(R.id.item_evaluate_item,item.getParamsName());

        EvaluateButton evaluateButton = helper.getView(R.id.item_evaluate_item);

        evaluateButton.setCheck(item.isCheck());
    }
}
